package com.itheima.stock.mapper;

import com.itheima.stock.common.domain.QueryLikeDomain;
import com.itheima.stock.common.domain.StockRtDescriptionDomain;
import com.itheima.stock.pojo.StockBusiness;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author HearTheSong
* @description 针对表【stock_business(主营业务表)】的数据库操作Mapper
* @createDate 2022-03-13 17:42:28
* @Entity com.itheima.stock.pojo.StockBusiness
*/
@Mapper
public interface StockBusinessMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockBusiness record);

    int insertSelective(StockBusiness record);

    StockBusiness selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockBusiness record);

    int updateByPrimaryKey(StockBusiness record);
    /*------------------*/
    List<StockBusiness> getAll();
    /**
        获取所有股票的code
     */
    List<String> getStockIds();
    /*
    功能描述：根据输入的个股代码，进行模糊查询，返回证券代码和证券名称
 */
    List<QueryLikeDomain> queryLikeByCode(@Param("searchStr") String searchStr);
    /*
        功能描述：个股主营业务查询接口
        服务路径：/api/quot/stock/describe
        服务方法：GET
        请求参数：code #股票编码
     */
    StockRtDescriptionDomain queryRtStockBusiness(@Param("code") String code);
}
